#ifndef DOWCONSTRAINTWINDOW_H_
#define DOWCONSTRAINTWINDOW_H_

#include <gtkmm/dialog.h>
#include <libglademm.h>
#include <gtkmm/combobox.h>
#include <gtkmm/button.h>
#include <boost/shared_ptr.hpp>

class Constraint;

class DOWConstraintWindow : public Gtk::Dialog{
    boost::shared_ptr<Constraint> constraint_; // the user-given constraint

public:
    DOWConstraintWindow(BaseObjectType*, const Glib::RefPtr<Gnome::Glade::Xml>&);
    virtual ~DOWConstraintWindow();

	virtual bool on_delete_event(GdkEventAny*);
    virtual void on_ok();
    virtual void on_cancel();

    boost::shared_ptr<Constraint> constraint() const;

    // widgets
private:
    Gtk::Button* ok_button_;
    Gtk::Button* cancel_button_;
    Gtk::ComboBox* days_combobox_;

    // Helper functions
private:
    void constraint(boost::shared_ptr<Constraint> constraint);
};

#endif /* DOWCONSTRAINTWINDOW_H_ */
